#ifndef VEC3_H
#define VEC3_H

namespace Engine
{
	class Vec3
	{
		public:
			float x, y, z;

			Vec3();

			Vec3(float _x, float _y, float _z);

			Vec3& operator +=(const Vec3& rhs);

			Vec3 operator+(const Vec3& rhs) const;

			Vec3& operator +=(float a);

			Vec3 operator+(float a) const;

			Vec3& operator -=(const Vec3& rhs);

			Vec3 operator-(const Vec3& rhs) const;

			Vec3& operator -=(float a);

			Vec3 operator-(float a) const;

			Vec3 operator-() const;

			Vec3& operator*=(float a);

			Vec3 operator*(float a) const;

			Vec3& operator*=(Vec3& rhs);

			Vec3 operator*(Vec3& rhs) const;

			Vec3 operator/(float a) const;

			Vec3& operator/=(float a);

			float& operator[](unsigned int index);

			float* ToArray();

			float Length() const;

			void Normalize();

			float SquaredLength() const;

			static float Distance (const Vec3& a, const Vec3& b){return(a-b).Length();}
	};

	float DotProduct(const Vec3& a, const Vec3& b);
	Vec3 CrossProduct(const Vec3& a, const Vec3& b);
}

#endif